package com.loong.ems.domain.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author 龙勇-229970722
 * @date 2025-01-02 8:59
 * @description: 员工实体类
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "employee")
public class Employee {

    @TableId
    @Schema(name = "员工ID", description = "数据库字段: id, 员工ID", example = "1")
    private Long id;

    @Schema(name = "姓名", description = "数据库字段: name, 员工姓名")
    private String name;

    @Schema(name = "工号", description = "数据库字段: code, 员工工号")
    private String code;

    @Schema(name = "电子邮箱", description = "数据库字段: email, 员工电子邮箱")
    private String email;

    @Schema(name = "手机号", description = "数据库字段: mobile, 员工手机号")
    private String mobile;

    @Schema(name = "身份证号", description = "数据库字段: id_card, 员工身份证号")
    private String idCard;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @Schema(name = "出生日期", description = "数据库字段: birthday, 员工出生日期")
    private Date birthday;

    @Schema(name = "性别", description = "数据库字段: sex, 员工性别(0-未知 1-男 2-女)")
    private Integer sex;

    @Schema(name = "民族", description = "数据库字段: nation_code, 员工民族")
    private String nationCode;

    @Schema(name = "政治面貌", description = "数据库字段: political_code, 员工政治面貌")
    private String politicalCode;

    @Schema(name = "籍贯", description = "数据库字段: native_place, 员工籍贯")
    private String nativePlace;

    @Schema(name = "毕业院校", description = "数据库字段: graduate_school, 员工毕业院校")
    private String graduateSchool;

    @Schema(name = "专业", description = "数据库字段: major_code, 员工专业")
    private String majorCode;

    @Schema(name = "最高学历", description = "数据库字段: highest_education_code, 员工最高学历")
    private String highestEducationCode;

    @Schema(name = "最高学位", description = "数据库字段: highest_degree_code, 员工最高学位")
    private String highestDegreeCode;

    @Schema(name = "现居住地", description = "数据库字段: habitation, 员工现居住地")
    private String habitation;

    @Schema(name = "婚姻状态", description = "数据库字段: marital_status, 员工婚姻状态(0-未知 1-未婚 2-已婚 3-离异)")
    private Integer maritalStatus;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @Schema(name = "入职日期", description = "数据库字段: entry_date, 员工入职日期")
    private Date entryDate;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @Schema(name = "离职日期", description = "数据库字段: leave_date, 员工离职日期")
    private Date leaveDate;

    @Schema(name = "任职部门ID", description = "数据库字段: dept_id, 员工任职部门ID")
    private Long deptId;

    @Schema(name = "岗位岗级ID", description = "数据库字段: post_level_id, 员工岗位岗级ID")
    private Long postLevelId;

    @Schema(name = "绑定用户ID", description = "数据库字段: user_id, 员工绑定用户ID")
    private Long userId;

    @Schema(name = "状态", description = "数据库字段: status, 员工状态(0-在职 1-离职)")
    private Integer status;
}
